package cbm.commons;

import java.util.HashMap;

public class SessionContainer {
	
	private HashMap<String,Object> session = new HashMap<String,Object>();
	private HashMap<String,Object> temporal = new HashMap<String,Object>();
	
	public HashMap<String, Object> getSession() {
		return session;
	}

	public void setSession(HashMap<String, Object> session) {
		this.session = session;
	}

	public HashMap<String, Object> getTemporal() {
		return temporal;
	}

	public void setTemporal(HashMap<String, Object> temporal) {
		this.temporal = temporal;
	}

	public void addSessionElement(String key,Object objet){
		session.put(key,objet);
	}
	
	public void addTemporal(String key,Object objet){
		temporal.put(key,objet);
	}
	
	public void removeTemporal(String key){
		temporal.remove(key);
	}
	
	public void removeTemporales(){
		temporal.clear();
	}
	
	public Object getSessionElement(String key){
		return session.get(key);
	}
	
	public Object getTemporalElement(String key){
		return temporal.get(key);
	}
}